<?php
/**
 * Created by PhpStorm.
 * User: zhanglu
 * Date: 2019/4/1
 * Time: 4:42 PM
 */

$this->title = '期刊资源';
$this->registerCss("
    body{background:#F7F7F7}
    .page-qikan{padding:40px 0px 0px 0px;}
    .sec{margin:0px 20px 30px 20px}
    .sec .title{padding:10px 15px;background:#F4F3F3;font-weight:bold;font-size:16px;}
    .list-item{padding:10px 0px}
    .list-item .title{
        background:#fff;
        margin-top: 5px;
        margin-bottom: 0px;
        font-size:13px;
        color:#333;
        text-align: center;
        font-weight: 500;
        text-overflow:ellipsis;/* 超出部分显示省略号 */
        white-space: nowrap;/*规定段落中的文本不进行换行 */
        overflow: hidden;
    }
    .pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus {
        background-color: #F6C900;
        border-color: #F6C900;
    }
    .pagination > li > a, .pagination > li > span {
        color: #F6C900;
    }
    .pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus {
        color: #F6C900;
    }
");
$per_url = Yii::$app->params['imgurl'];
?>

<div class="page-qikan">
    <div class="sec-one sec" style="border:1px solid #DBDBDB;">
        <div class="title">
            <span style="padding: 0 3px;background:#F6C900;margin-right: 10px;"></span>
            期刊资源
        </div>
        <div class="list" style="padding:15px 15px 0px 15px;background: #fff">
            <div class="row">
                <?php foreach($list as $v){ ?>
                    <a href="/touch/default/resource-view?id=<?=$v['id']?>">
                        <div class="col-xs-6">
                            <div class="list-item">
                                <div>
                                    <img src="/img/120-160.png" alt="" style="width:100%; background:url(<?=$per_url . $v['image_path'] ?>); background-size:cover;border: 1px solid #E6E6E6;border-radius: 6px;">
                                </div>
                                <p class="title"><?=$v['title']?></p>
                            </div>
                        </div>
                    </a>
                <?php }?>
            </div>
            <div class="text-center"> <?= \yii\widgets\LinkPager::widget(['pagination' => $pages,
                    'firstPageLabel'=>"首页",
                    'prevPageLabel'=>'«',
                    'nextPageLabel'=>'»',
                    'lastPageLabel'=>'末页',
                    'maxButtonCount'=>4
                ]);
                ?></div>
        </div>

    </div>
</div>

